package com.castle.fortress.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 试卷状态
 * @author castle
 */
@Getter
@AllArgsConstructor
public enum ExamStatusEnum {
    DRAFT(1,"草稿","草稿"),
    NOT_START(2,"未开始","未开始"),
    GOING(3,"进行中","进行中"),
    FINISH(4,"已结束","已结束"),
    TIME_INTERVAL(5,"定时发布","定时发布"),
    EARLY_FINISH(6,"提前结束","提前结束"),
    ;

    Integer code;
    String name;
    String desc;

    public static Integer getCodeByName(String name){
        for(BankCardTypeEnum e:BankCardTypeEnum.values()){
            if(e.getName().equals(name)){
                return e.getCode();
            }
        }
        return null;
    }
}
